package com.hmall.item.search;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @author 29143
 */
@MapperScan("com.hmall.search.mapper")
@SpringBootApplication
public class SearchApplication {

    public static void main(String[] args) {
        SpringApplication.run(SearchApplication.class,args);
    }


    @Bean
    RestHighLevelClient client(){
        return new RestHighLevelClient(RestClient.builder(
                HttpHost.create("http://192.168.200.119:9200")
        ));
    }
}
